/*
 * @Author: czy
 * @Date: 2021-06-03 21:29:16
 * @LastEditTime: 2021-06-05 22:59:35
 */
#include "string.h"

#include "stdio.h"
#include "map.h"

int testmap(int argc, char *argv[])
{
    char temp[100] = "";
    Map map = newMap(char *);
    printf("\033[35mSet String1=This is the first string.\n");
    map.set(&map, "String1", "This is the first string.");
    printf("Set String2=This is the second string.\n");
    map.set(&map, "String2", "This is the second string.");
    printf("Set String3=This is the third string.\n\033[0m");
    map.set(&map, "String3", "This is the third string.");
    printf("\033[35mGet the first string: \033[0m%s\n", map.get(&map, "String1"));
    printf("\033[35mModify String1=The first string has been modified.\n\033[0m");
    map.set(&map, "String1", "The first string has been modified.");
    printf("\033[35mGet first string: \033[0m%s\n", map.get(&map, "String1"));
    printf("\033[35mGet the second string: \033[0m%s\n", map.get(&map, "String2"));
    printf("\033[35mGet a key that doesn't exist: \033[0m%s\n", map.get(&map, "String4"));
}
